@use "../_variables" as *;

.setting-container {
  display: flex;
  height: 100%;
  overflow: hidden;

  @media (max-width: $breakpoint-xs) {
    width: 100%;
    padding: 0;
    flex-direction: column;
    gap: 0;
  }
}

.setting-content {
  display: flex;
  flex: 1;
  justify-content: flex-start;
  align-items: flex-start;
  height: 100%;
  padding: 40px;
  padding-top: 45px;
  background: var(--bg);
  overflow-x: auto;

  @include scrollbar;
}

.setting-sidebar {
  min-width: 228px;
  background: var(--bg);
  border-right: 1px solid var(--stroke-gray-medium);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: calc($header-height + 10px) 0;
  gap: 10px;

  .setting-sidebar-category {
    width: 100%;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 500;
    border-top: 1px solid var(--stroke-gray-medium);
    border-bottom: 1px solid var(--stroke-gray-medium);

    &.link {
      cursor: pointer;
    }

    .setting-sidebar-category-left {
      display: flex;
      align-items: center;
      gap: 8px;
      white-space: nowrap;

      img {
        width: 24px;
        height: 24px;
      }
    }
  }

  .setting-sidebar-item-wrap {
    width: 100%;
    padding: 0 10px;
    border-radius: 8px;
  }

  .setting-sidebar-item {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: background $transition-normal ease;

    &.active {
      background: var(--bg-pri-weak);
    }

    &:hover {
      background: var(--bg-gray-medium);
    }
  }

  @media (max-width: $breakpoint-xs) {
    width: 100%;
    border: none;
    flex-direction: row;
    padding: $header-height 16px 0;
    overflow-x: auto;
    gap: 0;
    position: sticky;
    left: 0;
    overflow-x: auto;

    @include scrollbar;

    .setting-sidebar-category,
    .setting-sidebar-version {
      display: none;
    }

    .setting-sidebar-item-wrap {
      width: fit-content;
      padding: 0 2px;
    }

    .setting-sidebar-item {
      padding: 12px 10px 8px 10px;
      border-radius: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      white-space: normal;
      text-align: center;

      &.active {
        background: none;
        border-bottom: 2px solid var(--stroke-pri-strong);
        color: var(--text-pri);
      }

      &:hover {
        background: none;
        color: var(--text-pri);
      }
    }
  }

  .setting-sidebar-version {
    font-size: 14px;
    color: var(--text-weak);
    padding: 8px 14px;
    width: 100%;
    text-align: start;
  }
}